package com.gg.ai.pojo;

import com.gg.ai.service.ChatHistoryService;
import com.gg.ai.service.impl.ChatHistoryServiceImpl;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.bind.annotation.RestController;


public class JsonVariable {

    //        // 构造 JSON 数据
    public static JsonObject jsonObject = new JsonObject();
    public static JsonObject headerObject = new JsonObject();
    public static JsonObject parameterObject = new JsonObject();
    public static JsonObject chatObject = new JsonObject();
    public static JsonArray textArray = new JsonArray();

    public static JsonObject payloadObject = new JsonObject();
    public static JsonObject messageObject = new JsonObject();

    public static String historyList;
    public static String question;

    public static JsonObject createJsonObject(String role, String content) {
        JsonObject obj = new JsonObject();
        obj.addProperty("role", role);
        obj.addProperty("content", content);
        return obj;
    }

//    public static Integer userId;
//    public static RequestJson requestJson = new RequestJson();
//    public static RequestJson.HeaderDTO header = new RequestJson.HeaderDTO();
//    public static RequestJson.ParameterDTO parameter = new RequestJson.ParameterDTO();
//    public static RequestJson.ParameterDTO.ChatDTO chat = new RequestJson.ParameterDTO.ChatDTO();
//    public static RequestJson.PayloadDTO payload = new RequestJson.PayloadDTO();
//    public static RequestJson.PayloadDTO.MessageDTO message = new RequestJson.PayloadDTO.MessageDTO();
//    public static RequestJson.PayloadDTO.MessageDTO.TextDTO text1 = new RequestJson.PayloadDTO.MessageDTO.TextDTO();
}
